import request from '@/utils/request'

//获取学科列表
export const getXuekeListApi = (params) => request({
    url: '/subjects',
    params,
})

//新增学科
export const addXuekeApi = (data) => request({
    url: '/subjects',
    method: 'post',
    data,
})
//删除学科
export const delXuekeApi = id => request({
    url: '/subjects/' + id,
    method: 'delete',
})

//获取学科详情
export const getXuekeInfoApi = (id) => request({
    url: '/subjects/' + id
})
//修改学科
export const editXuekeApi = data => request({
    url: '/subjects/' + data.id,
    method: 'put',
    data,
})

//获取学科简单列表
export const getXuekeEasyListApi = () => request({
    url: '/subjects/simple',
})